home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "modSample"
- Option Explicit
-
- Global g_dbDraw As Database
-
- Sub Main()
- Set g_dbDraw = DBEngine(0).OpenDatabase(App.Path & "\sample.mdb")
- frmSample.Show
- End Sub
- Private Function ParseString(pString As String, pDelimiter As String) As String
- 'Purpose:
- ' Parses a value from a string with a known delimiter
- 'Parameters:
- ' pString: the string to parse from
- ' pDelimiter: the delimiter used to separate parsed values
- 'Returns:
- ' the portion of the string parsed out
- 'Notes:
- ' pString will be reduced to remainder of string after removal
- ' of parsed value and the following delimiter.
-
- Dim x As Integer
-
- x = InStr(pString, pDelimiter)
-
- If x > 0 Then
- ParseString = Mid$(pString, 1, x - 1)
- pString = Mid$(pString, x + Len(pDelimiter))
- Else
- 'Delimiter not found in string
- ParseString = pString
- pString = ""
- End If
- End Function
-